import {
  createBrowserRouter,
} from "react-router-dom";
import Layout from "../pages/LayOut";
import Home from "../pages/home";
import About from "../pages/About";


const router = createBrowserRouter([
  {
    path: "/",
    element: <Layout></Layout>,
    children: [
      {
        path: "about",
        element:  <About></About>,
      },
      {
        path: "home",
        element: <Home></Home>,
      },
    ]
  },
  {
    path: "*",
    element: '错误页面',
  }
]);

export default router;